import request from '@/utils/request'
import download from "@/utils/downloader.js";

//学生分页列表
export function studentList(data) {
	return request({
		url: '/admin/user/student/studentList',
		method: 'get',
		params:data
	})
}
//添加学生
export function addStudent(data) {
	return request({
		url: '/admin/user/student/addStudent',
		method: 'post',
		data
	})
}
//修改学生信息
export function updateStudent(data) {
	return request({
		url: '/admin/user/student/updateStudent',
		method: 'post',
		data
	})
}
// 重置学生密码
export function studentPwdReset(data) {
	return request({
		url: '/admin/user/student/resetPassword',
		method: 'put',
		params: data
	})
}
// 删除学生
export function removeStudent(data) {
	return request({
		url: '/admin/user/student/removeStudent',
		method: 'delete',
		params: data
	})
}
//导入学生
export function importStudent(data) {
	return request({
		url: '/admin/user/student/importStudent',
		method: 'post',
		data
	})
}
//导出学生
export function studentExport(data) {
	return download({
		url: '/admin/user/student/studentExport',
		method: 'get',
		params: data
	})
}
//修改启用/禁用状态	
export function updateState(data) {
	return request({
		url: '/admin/user/student/updateState',
		method: 'post',
		params: data
	})
}
//下载导入模板	
export function downloadTemplate(data) {
	return download({
		url: '/admin/user/student/downloadTemplate',
		method: 'get',
		params: data
	})
}
//根据学生id获取学生信息
export function selectStudentDetail(data) {
	return request({
		url: '/admin/user/student/selectStudentDetail',
		method: 'get',
		params: data
	})
}
